package io.renren.modules.echarts.service.impl;


import io.renren.modules.echarts.ResVo.BarVo;
import io.renren.modules.echarts.ResVo.LineVo;
import io.renren.modules.echarts.ResVo.PieVo;
import io.renren.modules.echarts.dao.LeftDao;
import io.renren.modules.echarts.entity.BarEntity;
import io.renren.modules.echarts.entity.LineEntity;
import io.renren.modules.echarts.entity.PieEntity;
import io.renren.modules.echarts.service.LeftService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Administrator
 */
@Service
public class LeftServiceImpl implements LeftService {
    @Autowired
    private LeftDao leftDao;

    @Override
    public List<LineVo> getLineAllData() {
        List<LineEntity> lineEntity= leftDao.getLineAllData();
        return LineVo.buid(lineEntity);
    }

    @Override
    public List<BarVo> getBarAllData() {
        List<BarEntity> barAllData = leftDao.getBarAllData();
        return BarVo.build(barAllData);
    }

    @Override
    public List<PieVo> getPieAllData() {
        List<PieEntity> pieAllData = leftDao.getPieAllData();
        return PieVo.build(pieAllData);
    }
}
